package com.pub.paypal.service;

import com.paypal.base.rest.PayPalRESTException;
import com.pub.paypal.common.vo.PaypalVo;
import com.pub.paypal.model.RefundEntity;

import java.util.Map;

/**
 * paypal支付接口
 */
public interface PaypalService {
    /**
     * 执行支付
     * @param token paypal支付编号id 唯一
     * @param payerID
     * @return
     * @throws
     */
    PaypalVo successPay(String token, String payerID) throws PayPalRESTException;

    /**
     * 退款
     * @param refundEntity
     * @return
     * @throws Exception
     */
    String refund(RefundEntity refundEntity);

    String getRefund(String refundId);
}
